#include <rclcpp/rclcpp.hpp>
#include <pluginlib/class_loader.hpp>
//加载基类头文件
#include "plugin_01/plugin_interface_01.hpp"

int main(int argc,char** argv){
    rclcpp::init(argc,argv);
    //创建插件加载器
    pluginlib::ClassLoader<motion_control_system::MotionController> controller_loader("plugin_01","motion_control_system::MotionController");
    //选择要加载的插件
    std::string controoler_name="motion_control_system/SimpleMotionController";
    //加载插件--创建插件类对象
    auto controller=controller_loader.createSharedInstance(controoler_name);
    //使用插件类对象
    controller->start();
    // ......
    controller->stop();

    rclcpp::shutdown();
    return 0;
}